package datatypes;

import java.util.NoSuchElementException;

public enum MCObject {
	BOAT				(1),
	MINECART			(10),
	MINECART_STORAGE	(11),
	MINECART_POWERED	(12),
	
	TNT_ACTIVATED		(50),
	
	ARROW_PROJ			(60),
	SNOWBALL_PROJ		(61),
	EGG_PROJ			(62),
	
	SAND_FALLING		(70),
	GRAVEL_FALLING		(71),
	
	ENDEREYE			(72),
	DRAGONEGG_FALLING	(74),
	
	FISHINGFLOAT		(90);
	
	private int typeid;
	MCObject(int typeid) {
		this.typeid = typeid;
	}
	
	
	public static MCObject getObject(int typeid) {
		for(MCObject object : values()) {
			if(object.typeid == typeid) {
				return object;
			}
		}
		throw new NoSuchElementException();
	}
}
